Natural Order is a System Extension that improves the sorting order that your Macintosh uses when it displays lists of items.
If you have a group of numbered files on your disk and you select “View By Name” in the Finder, you might expect the files to be displayed in sensible numerical order, like this:
Picture1.jpg
Picture2.jpg
Picture3.jpg
Picture4.jpg
Picture5.jpg
Picture6.jpg
Picture7.jpg
Picture8.jpg
Picture9.jpg
Picture10.jpg
Picture11.jpg
Picture12.jpg
If you’ve ever had a group of numbered files on your disk, you’ll know that the Finder doesn’t do this. When you select “View By Name” what you get looks like this:
Picture1.jpg
Picture10.jpg
Picture11.jpg
Picture12.jpg
Picture2.jpg
Picture3.jpg
Picture4.jpg
Picture5.jpg
Picture6.jpg
Picture7.jpg
Picture8.jpg
Picture9.jpg
This looks stupid, and it’s because the System is just sorting the names lexicagraphically. By the same logic that dictates that “ab” comes alphabetically before “c” (which is correct) the System decides that “12” comes before “3” (which is stupid). D’oh! Natural Order works by overriding the System’s comparison of the numerical portions of strings, and sorts them by numerical value instead of “alphabetical” value.
How to use Natural Order
Drop Natural Order into the System Folder and Restart your Mac.
Restrictions
Natural Order has only been tested on System 7.5.3. It should work on other Systems, but I have not personally tested it.
Natural Order works by overriding the System’s IUMagString function. Programs that use their own sorting order and do not call IUMagString will not get any benefit from Natural Order.
Frequently Asked Questions
Are there any Frequently Asked Questions about Natural Order?
Not yet.
Licence
Natural Order is freeware. Providing that you acknowledge my authorship, you may distribute it any way you like, or do anything else with it, including producing derivative works from the source code. If my source code allows you to improve the user interface of your software, then I will be happy to have made a small contribution to improving the lives of computer users.
Note: Macintosh programmers SHOULD NOT incorporate the Natural Order algorithm in their applications. Macintosh programs should call International Utilities (IU) routines, and let the System Sofware handle sorting order. Some people, like people whose primary language is not English, may prefer to have their lists sorted a different way. Using the IU routines allows the System Software to give them their preferred sorting order. The corollary of this is that programs that do not use IU routines will not receive any benefit from Natural Order. You may bundle Natural Order with your Macintosh software, along with this ReadMe file.
Version History
0.9 Friday 21st June 1996, written overnight at MacHack, due to persistent cajoling by Quinn.